package mittens.skat;

import java.util.Collections;
import java.util.Stack;

public class Deck {
	public Deck( ){
		cards_ = new Stack<Card>();
		for( int suit = 9; suit <= 12; suit++ ){
			
			for( int value = 7; value <= 14; value++ ){
				cards_.push(new Card(suit,value));
			}
		}
		shuffle();
	}
	
	public void shuffle( ){
		Collections.shuffle(cards_);
	}

	
	public Card[] dealTopN( int n ){
		Card[] cards = new Card[n];
		for( int i=0; i < n; i++ ){
			cards[i] = cards_.pop();
		}
		return cards;
	}
	
	private Stack<Card> cards_;
}
